<template>
  <div>
    <van-empty v-if="approvelList.length===0" image="search" description="没有数据" />
    <div v-else>
      <div
        v-for="(item,index) in approvelList"
        :key="index"
        class="approvel_item pad15 van-hairline--bottom"
      >
        <van-row>
          <van-col span="16">
            <p>会议名称：{{item.Name}}</p>
            <p>会议开始日期：{{item.StartDate.split('T')[0]}}</p>
            <p>会议结束日期：{{item.EndDate.split('T')[0]}}</p>
            <p>会议编号：{{item.IDNo}}</p>
          </van-col>
          <van-col style="
  text-align: right;" span="8">
            <!-- <div>
              <van-circle 
                v-if="showCirle&&item.currentRate"
                v-model="currentRate"
                :rate="item.currentRate"
                :text="item.currentRate+'%'"
                layer-color="#ebedf0"
                :color="Math.floor(((item.cost||0) / ((item.EventBudgetList&&item.EventBudgetList[0]&&item.EventBudgetList[0].BudgetAmount)||50000)) * 100)<80?'#1989fa':'#FB304D'"
                :clockwise="false"
                size="70px"
              />
            </div> -->
            <div class="approvel_item_btn">
              <van-button
                type="info"
                size="mini"
                @click="goApprovelList(item.IDNo)"
              >详情</van-button>
            </div>
          </van-col>
        </van-row>
      </div>
    </div>
  </div>
</template>

<script>
/**
 *当前组件为会议列表页面子组件 浏览整体会议列表的作用
 */
export default {
  props: {
    approvelList: {
      type: Array,
      default: [],
    },
    showCirle: {
      type: Boolean,
      default: false,
    },
    allend: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      currentRate: 90,
    };
  },
  created() {
    console.log(this.showCirle);
  },
  mounted() {},
  methods: {
    goApprovelList(eventid) {
      if (!this.allend) {
        sessionStorage.setItem("eventid",JSON.stringify(eventid))
        sessionStorage.setItem("changeApprovel",JSON.stringify(true))
        this.$router.push({
          path: "/approvelDetail",
          query: { eventid},
        });
      } else {
        this.$router.push({
          path: "/al_stop",
          query: { eventid: eventid},
        });
      }
    },
  },
};
</script>

<style scoped>


</style>